<?php if (!defined('THINK_PATH')) exit();?><block name='content'>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src='/Public/jquery.min.js'></script>
	<script src='/Public/foundation/js/foundation.min.js'></script>
	<link rel="stylesheet" href="/Public/foundation/css/foundation.min.css">
</head>
<body>
<div class="small-2 columns">
<ul class="side-nav">
  <li><a href="#">Link 1</a></li>
  <li><a href="#">Link 2</a></li>
  <li><a href="#">Link 3</a></li>
  <li><a href="#">Link 4</a></li>
</ul>
</div>
<div class="small-10 columns">
<table id='Tbl'>
<thead>
	<tr>
		<th><input type="checkbox" onclick="selectAll(this)" value='全选'></th>
		<th>编号</th>
		<th>规则名称</th>
		<th>分值</th>
		<th>描述</th>
		<th>锁定</th>
		<th>创建时间</th>
		<th>修改时间</th>
		<th>操作</th>
	</tr>
	</thead>
	<tbody>
	<?php if(is_array($points_rule)): $i = 0; $__LIST__ = $points_rule;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr id="row_<?php echo ($vo["points_rule_id"]); ?>">
			<td><input type="checkbox" class='select' value='<?php echo ($vo["points_rule_id"]); ?>' ></td>
			<td><?php echo ($vo["points_rule_id"]); ?></td>
			<td><input name="rule_name" class="clss" disabled type="text" value="<?php echo ($vo["rule_name"]); ?>"></td>
			<td><input name="val" class="clss" disabled type="text" value="<?php echo ($vo["val"]); ?>"></td>
			<td><input name="desc" class="clss" disabled style="width:4em;" type="text" value="<?php echo ($vo["desc"]); ?>"></td>
                
			<td>
			<div class="switch tiny">
    		<input id="<?php echo ($vo["points_rule_id"]); ?>" type="checkbox">
    		<label for="<?php echo ($vo["points_rule_id"]); ?>"></label>
  			</div>
			</td>
			<td><input name="ctime" class="clss" disabled style="width:4em;" type="text" value="<?php echo ($vo["ctime"]); ?>"></td>
                <td><input name="mtime" class="clss" disabled style="width:4em;" type="text" value="<?php echo ($vo["mtime"]); ?>"></td>
                <th>
                    <div class="switch tiny">
                        <input onclick="lock(this)" value="<?php echo ($vo["points_rule_id"]); ?>" id="lock_<?php echo ($vo["points_rule_id"]); ?>" type="checkbox"  <?php echo ($vo['lock']?'checked':''); ?>>
                        <label for="lock_<?php echo ($vo["points_rule_id"]); ?>"></label>
                    </div>
                </th>
                
			<td>
			<button type="button" onclick='edit("<?php echo ($vo["points_rule_id"]); ?>")' class='edit'>编辑</button>
			<button style='display:none' onclick='save("<?php echo ($vo["points_rule_id"]); ?>")' type="button" class="save">保存</button>
			</td>
		</tr><?php endforeach; endif; else: echo "" ;endif; ?>
	</tbody>
</table>